package com.linked.gateway.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 网关开关配置类
 *
 * @author :dbq
 * @date : 2022/9/22 15:02
 */
@Configuration
@ConfigurationProperties("switchconfig")
public class GatewaySwitchConfig {
    //白名单开关
    private boolean whiteSwitch;
    //黑名单开关
    private boolean blackSwitch;

    //token开关
    private boolean tokenSwitch;

    //参数保护开关
    private boolean paramProtectSwitch;


    public boolean isParamProtectSwitch() {
        return paramProtectSwitch;
    }

    public void setParamProtectSwitch(boolean paramProtectSwitch) {
        this.paramProtectSwitch = paramProtectSwitch;
    }

    public boolean isTokenSwitch() {
        return tokenSwitch;
    }

    public void setTokenSwitch(boolean tokenSwitch) {
        this.tokenSwitch = tokenSwitch;
    }

    public boolean isWhiteSwitch() {
        return whiteSwitch;
    }

    public void setWhiteSwitch(boolean whiteSwitch) {
        this.whiteSwitch = whiteSwitch;
    }

    public boolean isBlackSwitch() {
        return blackSwitch;
    }

    public void setBlackSwitch(boolean blackSwitch) {
        this.blackSwitch = blackSwitch;
    }

    @Override
    public String toString() {
        return "GatewaySwitchConfig{" +
                "whiteSwitch=" + whiteSwitch +
                ", blackSwitch=" + blackSwitch +
                ", tokenSwitch=" + tokenSwitch +
                '}';
    }
}
